<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="Array2,de.polygonal.ds.Array2,height,size,width,appendCol,appendRow,clear,contains,dump,fill,getArray,getCol,getIterator,getRow,isEmpty,prependCol,prependRow,resize,setCol,setRow,shiftDown,shiftLeft,shiftRight,shiftUp,toArray,toString,transpose,get,set" name="keywords">
<title>de.polygonal.ds.Array2</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Array2 - AS3 Data Structures For Game Developers';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">AS3 Data Structures For Game Developers v1.04</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?de/polygonal/ds/Array2.html&amp;de/polygonal/ds/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Array2</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Array2"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">de.polygonal.ds</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Array2</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="Collection.html">Collection</a></td>
</tr>
</table>
<p></p>
  A two-dimensional array.
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#height">height</a> : int<div class="summaryTableDescription">
   Indicates the height (rows).</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#size">size</a> : int<div class="summaryTableDescription">[read-only]
   
   The total number of items.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#width">width</a> : int<div class="summaryTableDescription">
   Indicates the width (colums).</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Array2()">Array2</a>(w:int, h:int)</div>
<div class="summaryTableDescription">
   Initializes a two-dimensional array to match a given width and
   height.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#appendCol()">appendCol</a>(a:Array):void</div>
<div class="summaryTableDescription">
   Appends a new column.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#appendRow()">appendRow</a>(a:Array):void</div>
<div class="summaryTableDescription">
   Appends a new row.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clear()">clear</a>():void</div>
<div class="summaryTableDescription">
   
   Clears all items.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#contains()">contains</a>(obj:*):Boolean</div>
<div class="summaryTableDescription">
   
   Determines if the collection contains a given item.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#dump()">dump</a>():String</div>
<div class="summaryTableDescription">
   Prints out all elements (for debug/demo purposes).</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#fill()">fill</a>(obj:*):void</div>
<div class="summaryTableDescription">
   Writes a given value into each cell of the two-dimensional array.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#get()">get</a>(x:int, y:int):*</div>
<div class="summaryTableDescription">
   Reads a value from a given x/y index.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getArray()">getArray</a>():Array</div>
<div class="summaryTableDescription">
   Grants access to the the linear array which is used internally to
   store the data in the two-dimensional array.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getCol()">getCol</a>(x:int):Array</div>
<div class="summaryTableDescription">
   Extracts a column from a given index.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getIterator()">getIterator</a>():<a href="../ds/Iterator.html">Iterator</a>
</div>
<div class="summaryTableDescription">
   
   Initializes an iterator object pointing to the first item in the
   collection.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getRow()">getRow</a>(y:int):Array</div>
<div class="summaryTableDescription">
   Extracts a row from a given index.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isEmpty()">isEmpty</a>():Boolean</div>
<div class="summaryTableDescription">
   
   Checks if the collection is empty.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#prependCol()">prependCol</a>(a:Array):void</div>
<div class="summaryTableDescription">
   Prepends a new column.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#prependRow()">prependRow</a>(a:Array):void</div>
<div class="summaryTableDescription">
   Prepends a new row.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#resize()">resize</a>(w:int, h:int):void</div>
<div class="summaryTableDescription">
   Resizes the array to match the given width and height.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#set()">set</a>(x:int, y:int, obj:*):void</div>
<div class="summaryTableDescription">
   Writes a value into a cell at the given x/y index.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setCol()">setCol</a>(x:int, a:Array):void</div>
<div class="summaryTableDescription">
   Inserts new values into a complete column of the two-dimensional
   array.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setRow()">setRow</a>(y:uint, a:Array):void</div>
<div class="summaryTableDescription">
   Inserts new values into a complete row of the two-dimensional array.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#shiftDown()">shiftDown</a>():void</div>
<div class="summaryTableDescription">
   Shifts all rows down by one row.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#shiftLeft()">shiftLeft</a>():void</div>
<div class="summaryTableDescription">
   Shifts all columns by one column to the left.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#shiftRight()">shiftRight</a>():void</div>
<div class="summaryTableDescription">
   Shifts all columns by one column to the right.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#shiftUp()">shiftUp</a>():void</div>
<div class="summaryTableDescription">
   Shifts all rows up by one row.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toArray()">toArray</a>():Array</div>
<div class="summaryTableDescription">
   
   Converts the collection into an array.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
   Prints out a string representing the current object.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#transpose()">transpose</a>():void</div>
<div class="summaryTableDescription">
   Flips rows with cols and vice versa.</div>
</td><td class="summaryTableOwnerCol">Array2</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="height"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">height</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>height:int</code>&nbsp;&nbsp;[read-write]<p>
   Indicates the height (rows).
   If a new height is set, the two-dimensional array is resized
   accordingly. The minimum value is 2.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get height():int</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set height(value:int):void</code>
<br>
</div>
<a name="size"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">size</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>size:int</code>&nbsp;&nbsp;[read-only]<p>
   
   The total number of items.
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get size():int</code>
<br>
</div>
<a name="width"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">width</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>width:int</code>&nbsp;&nbsp;[read-write]<p>
   Indicates the width (colums).
   If a new width is set, the two-dimensional array is resized
   accordingly. The minimum value is 2.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get width():int</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set width(value:int):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Array2()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Array2</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Array2(w:int, h:int)</code><p>
   Initializes a two-dimensional array to match a given width and
   height. The smallest possible size is a 1x1 matrix. The initial value
   of all elements is null.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">w</span>:int</code> &mdash; The width  (equals number of colums).
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">h</span>:int</code> &mdash; The height (equals number of rows).
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="appendCol()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">appendCol</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function appendCol(a:Array):void</code><p>
   Appends a new column. If the new column doesn't match the current
   height, the inserted column gets truncated or widened to match the
   existing height.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:Array</code> &mdash; The column to append.
   </td>
</tr>
</table>
</div>
<a name="appendRow()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">appendRow</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function appendRow(a:Array):void</code><p>
   Appends a new row. If the new row doesn't match the current width,
   the inserted row gets truncated or widened to match the existing
   width.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:Array</code> &mdash; The row to append.
   </td>
</tr>
</table>
</div>
<a name="clear()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clear</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function clear():void</code><p>
   
   Clears all items.
   </p></div>
<a name="contains()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">contains</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function contains(obj:*):Boolean</code><p>
   
   Determines if the collection contains a given item.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The item to search for.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if the item exists, otherwise false.
   </td>
</tr>
</table>
</div>
<a name="dump()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">dump</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function dump():String</code><p>
   Prints out all elements (for debug/demo purposes).
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; A human-readable representation of the structure.
   </td>
</tr>
</table>
</div>
<a name="fill()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">fill</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function fill(obj:*):void</code><p>
   Writes a given value into each cell of the two-dimensional array. If
   the obj parameter if of type Class, the method creates individual
   instances of this class for all array cells.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The item to be written into each cell.
   </td>
</tr>
</table>
</div>
<a name="get()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">get</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function get(x:int, y:int):*</code><p>
   Reads a value from a given x/y index. No boundary check is done, so
   you have to make sure that the input coordinates do not exceed the
   width or height of the two-dimensional array.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">x</span>:int</code> &mdash; The x index (column).
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">y</span>:int</code> &mdash; The y index (row).
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; The value at the given x/y index.
   </td>
</tr>
</table>
</div>
<a name="getArray()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getArray</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getArray():Array</code><p>
   Grants access to the the linear array which is used internally to
   store the data in the two-dimensional array. Use with care for
   advanced operations.
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code></td>
</tr>
</table>
</div>
<a name="getCol()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getCol</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getCol(x:int):Array</code><p>
   Extracts a column from a given index.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">x</span>:int</code> &mdash; The column index.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code> &mdash; An array storing the values of the column.
   </td>
</tr>
</table>
</div>
<a name="getIterator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getIterator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getIterator():<a href="../ds/Iterator.html">Iterator</a></code><p>
   
   Initializes an iterator object pointing to the first item in the
   collection.
      </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/Iterator.html">Iterator</a></code> &mdash; 
                        An iterator object.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="getRow()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getRow</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getRow(y:int):Array</code><p>
   Extracts a row from a given index.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">y</span>:int</code> &mdash; The row index.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code> &mdash; An array storing the values of the row.
   </td>
</tr>
</table>
</div>
<a name="isEmpty()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isEmpty</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function isEmpty():Boolean</code><p>
   
   Checks if the collection is empty.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if empty, otherwise false.
   </td>
</tr>
</table>
</div>
<a name="prependCol()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">prependCol</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function prependCol(a:Array):void</code><p>
   Prepends a new column. If the new column doesn't match the current
   height, the inserted column gets truncated or widened to match the
   existing height.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:Array</code> &mdash; The column to prepend.
   </td>
</tr>
</table>
</div>
<a name="prependRow()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">prependRow</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function prependRow(a:Array):void</code><p>
   Prepends a new row. If the new row doesn't match the current width,
   the inserted row gets truncated or widened to match the existing
   width.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:Array</code> &mdash; The row to prepend.
   </td>
</tr>
</table>
</div>
<a name="resize()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">resize</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function resize(w:int, h:int):void</code><p>
   Resizes the array to match the given width and height. If the new
   size is smaller than the existing size, values are lost because of
   truncation, otherwise all values are preserved. The minimum size
   is a 1x1 matrix.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">w</span>:int</code> &mdash; The new width (cols).
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">h</span>:int</code> &mdash; The new height (rows).
   </td>
</tr>
</table>
</div>
<a name="set()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">set</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function set(x:int, y:int, obj:*):void</code><p>
   Writes a value into a cell at the given x/y index. Because of
   performance reasons no boundary check is done, so you have to make
   sure that the input coordinates do not exceed the width or height of
   the two-dimensional array.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">x</span>:int</code> &mdash;   The x index (column).
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">y</span>:int</code> &mdash;   The y index (row).
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The item to be written into the cell.
   </td>
</tr>
</table>
</div>
<a name="setCol()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setCol</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setCol(x:int, a:Array):void</code><p>
   Inserts new values into a complete column of the two-dimensional
   array. The new column is truncated if it exceeds the existing height.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">x</span>:int</code> &mdash; The column index.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:Array</code> &mdash; The column's new values.
   </td>
</tr>
</table>
</div>
<a name="setRow()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setRow</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setRow(y:uint, a:Array):void</code><p>
   Inserts new values into a complete row of the two-dimensional array. 
   The new row is truncated if it exceeds the existing width.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">y</span>:uint</code> &mdash; The row index.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:Array</code> &mdash; The row's new values.
   </td>
</tr>
</table>
</div>
<a name="shiftDown()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">shiftDown</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function shiftDown():void</code><p>
   Shifts all rows down by one row. Rows are wrapped, so the last row
   is not lost but appended to the topmost row.
   </p></div>
<a name="shiftLeft()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">shiftLeft</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function shiftLeft():void</code><p>
   Shifts all columns by one column to the left. Columns are wrapped,
   so the column at index 0 is not lost but appended to the rightmost
   column.
   </p></div>
<a name="shiftRight()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">shiftRight</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function shiftRight():void</code><p>
   Shifts all columns by one column to the right. Columns are wrapped,
   so the column at the last index is not lost but appended to the
   leftmost column.
   </p></div>
<a name="shiftUp()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">shiftUp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function shiftUp():void</code><p>
   Shifts all rows up by one row. Rows are wrapped, so the first row
   is not lost but appended to bottommost row.
   </p></div>
<a name="toArray()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toArray</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toArray():Array</code><p>
   
   Converts the collection into an array.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code> &mdash; An array.
   </td>
</tr>
</table>
</div>
<a name="toString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toString():String</code><p>
   Prints out a string representing the current object.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; A string representing the current object.
   </td>
</tr>
</table>
</div>
<a name="transpose()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">transpose</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function transpose():void</code><p>
   Flips rows with cols and vice versa.
   </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">Copyright 2007-2008 Michael Baczynski | POLYGONAL</center>
</div>
</body>
</html>
<!--Copyright 2007-2008 Michael Baczynski | POLYGONAL-->
